﻿<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="PurchaseSales.Manage" namespace="PurchaseSales.Manage.Model.Entities">
  <class name="Sales" table="Sales" lazy="true">
    <id name="Id" column="Id" type="Guid">
      <generator class="guid.comb" />
    </id>
    <property type="string"  name="Number" column="[Number]" not-null="1" unique="1"/>
    <property type="double"  name="Count" column="[Count]" />
    <property type="decimal"  name="TotalPrice" column="[TotalPrice]" />
    <property type="DateTime"  name="SaleDate" column="[SaleDate]" />
    <property type="string"  name="Remark" column="[Remark]" />

    <many-to-one name="SaleUser" column="SaleUser" class="Users"/>
    <many-to-one name="Customer" column="Customer" class="Customer"/>
    <many-to-one name="Commodity" column="Commodity" class="Commodity"/>
    
  </class>
</hibernate-mapping>